package com.sky.mapper;

import com.sky.entity.OrderDetail;
import com.sky.entity.Orders;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 数据报表持久层
 *
 * @author admin
 * @date 2024/10/7
 */
@Mapper
public interface ReportMapper {

    /**
     * 查询营业额数据
     * @param map
     * @return
     */
    Double getTurnoverStatistics(Map<String, Object> map);

    /**
     * 查询用户数据
     * @param map
     * @return
     */
    Integer getUserStatistics(Map<String, Object> map);

    /**
     * 查询订单数量
     * @param map
     * @return
     */
    Integer getOrderCount(Map<String, Object> map);

    /**
     * 查询销量排名top10
     * @param map
     * @return
     */
    List<OrderDetail> getTop10(Map<String, Object> map);
}
